[URGENT] PutExportEntries is not being called in ECMA2

I am developing this ECMA2 based MA, but for some reason, the OpenExportConnection() and the CloseExportConnection() methods are being called, but the PutExportEntries() method is not being called. There is no exceptions thrown anywhere, so I cannot think of any reason why the PutExportEntries() method would not be called. Any insights /suggestions?

namespace FimSync_Ezma
{
    public class EzmaExtension :
    IMAExtensible2CallExport,
    IMAExtensible2GetSchema,
    IMAExtensible2GetCapabilities
    {
        [System.ComponentModel.DefaultValue(1000)]
        public int ExportMaxPageSize { get; set; }

        [System.ComponentModel.DefaultValue(100)]
        public int ExportDefaultPageSize { get; set; }

        //
        // Constructor
        //
        public EzmaExtension() { }

        public MACapabilities Capabilities
        {
            get
            {
                MACapabilities myCapabilities = new MACapabilities();

                myCapabilities.SupportExport = true;
                myCapabilities.FullExport = true;
                myCapabilities.ExportType = MAExportType.ObjectReplace;
                myCapabilities.NoReferenceValuesInFirstExport = true;
                myCapabilities.ExportPasswordInFirstPass = false;

                myCapabilities.SupportImport =false;
                myCapabilities.DeltaImport = false;

                myCapabilities.ConcurrentOperation = false;

                myCapabilities.ObjectRename = false;
                myCapabilities.DeleteAddAsReplace = false;

                myCapabilities.DistinguishedNameStyle = MADistinguishedNameStyle.None;
                myCapabilities.Normalizations = MANormalizations.None;

                return myCapabilities;
            }
        }

        public IList<ConfigParameterDefinition> GetConfigParameters(KeyedCollection<string, ConfigParameter> configParameters,
                                                            ConfigParameterPage page)
        {
            List<ConfigParameterDefinition> configParametersDefinitions = new List<ConfigParameterDefinition>();

            switch (page)
            {
                case ConfigParameterPage.Connectivity:
                    configParametersDefinitions.Add(ConfigParameterDefinition.CreateStringParameter("URL", ""));
                    configParametersDefinitions.Add(ConfigParameterDefinition.CreateEncryptedStringParameter("Username", ""));
                    configParametersDefinitions.Add(ConfigParameterDefinition.CreateStringParameter("Domain", ""));
                    configParametersDefinitions.Add(ConfigParameterDefinition.CreateStringParameter("Password", ""));
                    break;

                case ConfigParameterPage.Global:
                    break;

                case ConfigParameterPage.Partition:
                    break;

                case ConfigParameterPage.RunStep:
                    break;
            }

            return configParametersDefinitions;
        }

        public ParameterValidationResult ValidateConfigParameters(KeyedCollection<string, ConfigParameter> configParameters,
                                                                   ConfigParameterPage page)
        {
            ParameterValidationResult myResults = new ParameterValidationResult();
            return myResults;
        }

        public Schema GetSchema(KeyedCollection<string, ConfigParameter> configParameters)
        {
            Microsoft.MetadirectoryServices.SchemaType personType = Microsoft.MetadirectoryServices.SchemaType.Create("Person", false);

            personType.Attributes.Add(SchemaAttribute.CreateSingleValuedAttribute("accountName", AttributeType.String, Microsoft.MetadirectoryServices.AttributeOperation.ExportOnly));
            personType.Attributes.Add(SchemaAttribute.CreateSingleValuedAttribute("displayName", AttributeType.String, Microsoft.MetadirectoryServices.AttributeOperation.ExportOnly));

            Schema schema = Schema.Create();
            schema.Types.Add(personType);

            return schema;
        }


        public void OpenExportConnection(KeyedCollection<string, ConfigParameter> configParameters,
                    Schema types,
                    OpenExportConnectionRunStep exportRunStep)
        {
            // Do nothing
        }

        public PutExportEntriesResults PutExportEntries(IList<CSEntryChange> csentries)
        {
            foreach (CSEntryChange csentryChange in csentries)
            {
                string accountName = string.Empty;
                string displayName = string.Empty;

                foreach (string attrib in csentryChange.ChangedAttributeNames)
                {
                    switch (attrib)
                    {
                        case "accountName":
                            accountName = csentryChange.AttributeChanges["accountName"].ValueChanges[0].Value.ToString();
                            break;
                        case "displayName":
                            displayName = csentryChange.AttributeChanges["displayName"].ValueChanges[0].Value.ToString();
                            break;
                        default:
                            //ignore
                            break;
                    }
                }

                // TODO: Make API call
            }

            PutExportEntriesResults exportEntriesResults = new PutExportEntriesResults();
            return exportEntriesResults;
        }

        public void CloseExportConnection(CloseExportConnectionRunStep exportRunStep)
        {
            // Do nothing
        }
    };
}


May 1st, 2015 5:45pm

If you do a Connector Space search in miisclient, are there any Pending Exports showing up?
Free Windows Admin Tool Kit Click here and download it now
May 4th, 2015 6:17am

Yes, there are pending exports showing up in the connector space.
May 4th, 2015 12:30pm

Then the problem is probably this:

System.ComponentModel.DefaultValue

This attribute won't cause the values to be initialized. You need to do that in code (!). Try actually initializing the values to 100 and 1000.

ExportMaxPageSize = 1000;

ExportDefaultPageSize = 100;

Free Windows Admin Tool Kit Click here and download it now
May 4th, 2015 3:02pm

Thank you so much for helping out! Tried the initialization as you suggested, but did not change anything. Anything else I should be looking at?

            ExportMaxPageSize = 1000;

            ExportDefaultPageSize = 100;

May 4th, 2015 9:46pm

How are you seeing that the method isn't called?

Are you debugging in Visual Studio?

Free Windows Admin Tool Kit Click here and download it now
May 5th, 2015 2:49am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics